package org.jeecg.modules.shop.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.persistence.Column;

/**
 * @Description: sc_system_shop
 * @Author: jeecg-boot
 * @Date: 2021-10-31
 * @Version: V1.0
 */
@Data
@TableName("sc_system_shop")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "sc_system_shop对象", description = "sc_system_shop")
public class ScSystemShop implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "id")
    private Long id;
    /**
     * 店铺编号
     */
    @Excel(name = "店铺编号", width = 15)
    @ApiModelProperty(value = "店铺编号")
    private String houseId;
    /**
     * 店铺名称
     */
    @Excel(name = "店铺名称", width = 15)
    @ApiModelProperty(value = "店铺名称")
    private String title;
    /**
     * 店铺图片
     */
    @Excel(name = "店铺图片", width = 15)
    @ApiModelProperty(value = "店铺图片")
    private String imageUrl;
    /**
     * 用户ID
     */
    @Excel(name = "用户ID", width = 15)
    @ApiModelProperty(value = "用户ID")
    private String uid;
    /**
     * 用户头像
     */
    @Excel(name = "用户头像", width = 15)
    @ApiModelProperty(value = "用户头像")
    private String userImg;
    /**
     * 用户昵称
     */
    @Excel(name = "用户昵称", width = 15)
    @ApiModelProperty(value = "用户昵称")
    private String uname;
    /**
     * 用户电话
     */
    @Excel(name = "用户电话", width = 15)
    @ApiModelProperty(value = "用户电话")
    private String phone;
    /**
     * 位置
     */
    @Excel(name = "位置", width = 15)
    @ApiModelProperty(value = "位置")
    private String address;
    /**
     * 城市
     */
    @Excel(name = "城市", width = 15)
    @ApiModelProperty(value = "城市")
    private String city;
    /**
     * 区县
     */
    @Excel(name = "区县", width = 15)
    @ApiModelProperty(value = "区县")
    private String area;
    /**
     * 地区
     */
    @Excel(name = "地区", width = 15)
    @ApiModelProperty(value = "地区")
    private String ranges;
    /**
     * 店铺类型
     */
    @Excel(name = "店铺类型", width = 15)
    @ApiModelProperty(value = "店铺类型")
    private String dataType;
    /**
     * 详情链接
     */
    @Excel(name = "详情链接", width = 15)
    @ApiModelProperty(value = "详情链接")
    private String cuurl;
    /**
     * 月租金
     */
    @Excel(name = "月租金", width = 15)
    @ApiModelProperty(value = "月租金")
    private String yuezujin;
    /**
     * 日租金
     */
    @Excel(name = "日租金", width = 15)
    @ApiModelProperty(value = "日租金")
    private String rizujin;
    /**
     * 转让费
     */
    @Excel(name = "转让费", width = 15)
    @ApiModelProperty(value = "转让费")
    private String zrprice;
    /**
     * 面积
     */
    @Excel(name = "面积", width = 15)
    @ApiModelProperty(value = "面积")
    private Integer areaNum;
    /**
     * 面积单位
     */
    @Excel(name = "面积单位", width = 15)
    @ApiModelProperty(value = "面积单位")
    private String areaUnit;
    /**
     * 经营状态 -1 空置中 0 营业中
     */
    @Excel(name = "经营状态 -1 空置中 0 营业中", width = 15)
    @ApiModelProperty(value = "经营状态 -1 空置中 0 营业中")
    private Integer shopStatuss;
    /**
     * 经营类型
     */
    @Excel(name = "经营类型", width = 15)
    @ApiModelProperty(value = "经营类型")
    private String hangye;
    /**
     * 店铺简介
     */
    @Excel(name = "店铺简介", width = 15)
    @ApiModelProperty(value = "店铺简介")
    private String jianjie;
    /**
     * 店铺描述
     */
    @Excel(name = "店铺描述", width = 15)
    @ApiModelProperty(value = "店铺描述")
    private String detailInfo;
    /**
     * 二维码
     */
    @Excel(name = "二维码", width = 15)
    @ApiModelProperty(value = "二维码")
    private String orCode;
    /**
     * 100 待更新 ，200 商铺公海
     */
    @Excel(name = "100 待更新 ，200 商铺公海", width = 15)
    @ApiModelProperty(value = "100 待更新 ，200 商铺公海")
    private Integer state;
    /**
     * 是否是重要客户 0 不是 1 是
     */
    @Excel(name = "是否是重要客户 0 不是 1 是", width = 15)
    @ApiModelProperty(value = "是否是重要客户 0 不是 1 是")
    private Integer keyCustomers = 0;
    /**
     * 信息来源
     */
    @Excel(name = "信息来源", width = 15)
    @ApiModelProperty(value = "信息来源")
    private String source;
    /**
     * 是否已经联系 0 未联系  1 已联系
     */
    @Excel(name = "是否已经联系 0 未联系  1 已联系", width = 15)
    @ApiModelProperty(value = "是否已经联系 0 未联系  1 已联系")
    private Integer isContact;
    /**
     * 与客户联系时间
     */
    @Excel(name = "与客户联系时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "与客户联系时间")
    private Date contactTime;
    /**
     * 联系人（员工）
     */
    @Excel(name = "联系人（员工）", width = 15)
    @ApiModelProperty(value = "联系人（员工）")
    private String contactId;
    /**
     * 是否删除
     */
    @Excel(name = "是否删除", width = 15)
    @ApiModelProperty(value = "是否删除")
    private Integer isDelete;
    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    /**
     * 备注信息
     */
    @Excel(name = "备注信息", width = 15)
    @ApiModelProperty(value = "备注信息")
    private String remark;
    @Excel(name = "备注信息", width = 15)
    @ApiModelProperty(value = "备注信息")
    private Integer number;
    @Excel(name = "后台用户ID", width = 15)
    @ApiModelProperty(value = "后台用户ID")
    private String userId;


    @TableField(exist = false)
    private String titleCopy;
    @TableField(exist = false)
    private String realName;

    public String getTitleCopy() {
        System.out.println(this.title);
        System.out.println(this.getTitle());
        if (StringUtils.isNotEmpty(this.title) && this.title.contains("(") ){
            return getTitle().substring(5,getTitle().length());

        }
        return this.title;
    }


}
